package zk.weart.core.aliyun;

import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @Author zjk
 * @Description:
 * @Date 2022/5/11 14:30
 **/
@Configuration
@ConfigurationProperties(prefix = "aliyun")
@Data
public class AliyunConfig {

    String accessKeyId;

    String accessKeySecret;

    @Autowired
    OssConfig ossConfig;

    @Autowired
    SmsConfig smsConfig;

    @Configuration
    @ConfigurationProperties(prefix = "aliyun.oss")
    @Data
    public class OssConfig{

        String endpoint;
        String bucket;
    }


    @Configuration
    @ConfigurationProperties(prefix = "aliyun.sms")
    @Data
    public class SmsConfig{

        String endpoint;

        String signName;


    }


}
